package aml.parse.node;

import aml.runtime.Context;
import aml.runtime.Value;

// End Of Line
public class OpEOL extends OpNode {
	@Override
	public int precedence() {
		return -1000000000;
	}
	
	@Override
	public Value eval(Context ctx) {
		Value ret = null;
		if (lhs != null) ret = lhs.eval(ctx);
		if (ctx.getReturnFlag()) {
			return ret;
		}
		if (rhs != null) ret = rhs.eval(ctx);
		return ret;
	}

	@Override
	public String toString() {
		return "(\\n " + lhs + " " + rhs + ")";
	}
}